// {
// "goodsCode": "61200",
// "goodsName": "100 Coins",
// "orderNo": "b30c2938a5dc4836bd1d4701b8cb59e1",
// "payAmount": 0.99,
// "paidAmount": 0.99,
// "paidCurrency": "USD"
// }

import 'package:ceramics/util/ab_value_converter.dart';

class ABOrder {
  /// 商品编号
  String? goodsCode;
  /// 商品名称
  String? goodsName;
  /// 订单号
  String? orderNo;
  /// 支付金额
  double? payAmount;
  /// 已支付金额
  double? paidAmount;
  /// 已支付货币
  String? paidCurrency;

  static ABOrder fromJson(Map<String, dynamic> json) {
    return ABOrder()
      ..goodsCode = valueToString(json['goodsCode'])
      ..goodsName = valueToString(json['goodsName'])
      ..orderNo = valueToString(json['orderNo'])
      ..payAmount = valueToDouble(json['payAmount'])
      ..paidAmount = valueToDouble(json['paidAmount'])
      ..paidCurrency = valueToString(json['paidCurrency']);
  }
}